home *** CD-ROM | disk | FTP | other *** search
- 7th August 1992
- -----------------------------------------------------------------------------
- Support Group Application Note
- Number: 216
- Issue: 1
- Author: Russell Scott
- -----------------------------------------------------------------------------
-
- How to use MS-DOS EDLIN and DR DOS EDITOR under the PC Emulator
-
- -----------------------------------------------------------------------------
- Applicable Hardware: All RISC OS based platforms
-
- Related Application Notes: 215 - Configuring the correct PC keyboard driver
-
-
- -----------------------------------------------------------------------------
- Copyright (C) Acorn Computers Limited 1992
-
- Every effort has been made to ensure that the information in this leaflet is
- true and correct at the time of printing. However, the products described in
- this leaflet are subject to continuous development and improvements and
- Acorn Computers Limited reserves the right to change its specifications at
- any time. Acorn Computers Limited cannot accept liability for any loss or
- damage arising from the use of any information or particulars in this
- leaflet. ACORN, ECONET and ARCHIMEDES are trademarks of Acorn Computers
- Limited.
- -----------------------------------------------------------------------------
- Support Group
- Acorn Computers Limited
- Acorn House
- Vision Park
- Histon
- Cambridge CB4 4AE
- -----------------------------------------------------------------------------
-
-
- This application note describes how to use the text editors EDLIN (MS-DOS)
- and EDITOR (DR DOS) under the PC Emulator. These utilities are often used
- under the emulator for the creation and editing of the CONFIG.SYS and
- AUTOEXEC.BAT files.
-
-
- Contents
-
- Introduction
-
- A brief description of EDLIN and EDITOR
-
- The MS-DOS Text Editor EDLIN
-
- The DR DOS Text Editor EDITOR
-
- Adding lines to text files:
-
- - ECHO command
- - COPY CON command
-
-
- Introduction
-
- This application note describes how to use the text editors EDLIN (for
- MS-DOS) and EDITOR (for DR DOS) under the PC Emulator. It is applicable to
- the following versions of MS/DR DOS which have been supplied with various
- versions of the PC Emulator :
-
- MS-DOS 3.21, 3.30
- DR DOS 3.41, 5.0
-
-
- A brief description of EDLIN and EDITOR
-
- EDLIN and EDITOR are text editors. They allow you to create text files and
- save them on your discs. They also help you to update existing files by
- deleting, changing, and inserting lines in files. EDLIN is the text editor
- supplied with MS-DOS. EDITOR is the text editor supplied with DR DOS.
-
- These text editors are an alternative to the DOS commands COPY CON and ECHO
- used for creating or adding lines to a text file. EDLIN and EDITOR offer
- more powerful facilities including the editing of existing files.
-
- NOTE: For a more detailed description of these and other DOS utilities you
- should obtain a complete MS-DOS or DR DOS guide from any good dealer.
-
-
- The MS-DOS Text Editor EDLIN
-
- EDLIN is the MS-DOS line editor that you can use to create text files and
- save them on your discs. EDLIN also allows you to update existing files by
- deleting, changing and inserting lines in files.
-
- EDLIN divides the text from files into lines, each line containing up to 253
- characters. It gives each line a number and always numbers the lines
- consecutively. When you insert lines of text in a file, the line numbers
- after the inserted text are automatically adjusted. Similarly, when you
- delete lines in a file, the line numbers following the deleted text are
- automatically renumbered.
-
- To start EDLIN, type the following command:
-
- EDLIN [drive][path] filename <RETURN>
-
- where filename is the file you want to edit. If you are creating a new file,
- filename should be the name of the file you want to create. You should also
- include the path if the file is not in or going to be in the current working
- directory e.g. if EDLIN is in the directory C:\DOS and you wish to edit
- C:\BOOT\BATCH.BAT then you must specify the path (in this case C:\BOOT) for
- EDLIN to find the file.
-
- Once you have typed the command, EDLIN displays the following:
-
-
- NEW FILE or End of input file
- *_
-
-
- The EDLIN prompt is an asterisk (*).
-
- Here is a brief summary of commands that are available (Note: This is not a
- complete list).
-
- [line] I Insert lines of text
-
- The I (Insert) command allows you to insert text immediately before
- the specified line. If you are creating a new file, you must type
- the I (insert) command before you can insert a new line of text.
- Text begins on line 1, and the next line number appears
- automatically each time you press the RETURN key.
-
- [line],[line],[line]C Copies lines
-
- The C (copy) command copies a range of lines to a specified line
- number. The first and second line options specify the range of lines
- that you want to copy. The third line option specifies the line
- before which EDLIN will place the copied lines.
-
- [line],[line]D Deletes lines
-
- The D (delete) command deletes a specified range of lines in a file.
- If you omit the first line option, EDLIN defaults to the current
- line. If you omit the second line option, EDLIN deletes just the
- first line.
-
- [line] Edits a line or lines
-
- The line option allows you to specify the line number of text you
- want to edit.
-
- E Ends editing session and saves edited text
-
- [line],[line]L Lists a range of lines
-
- The L (list) command displays a range of lines, including the two
- lines specified. To list lines 5 through 10 inclusive, type: 5,10L
-
- Q Quit editing session without saving the changes
-
- CTRL C Exit editing/insert mode to return you to the command prompt (*)
-
-
-
- The DR DOS text editor EDITOR
-
- This section describes how to use EDITOR, a full-screen editor which you can
- use to create and edit text files. EDITOR allows you to scroll/edit a full
- page of text at a time.
-
- To start EDITOR type the following command:
-
-
- EDITOR [drive][path] filename <RETURN>
-
- where filename is the name of the file to edit or to create. If EDITOR finds
- the file, it displays it on the screen. If EDITOR cannot find the file it
- displays the message:
-
- c:\myfile.txt ...file not found
-
- Create new file (Y/N)?
-
- Type Y to create the file, or N to go to the EDITOR title screen where you
- can type in another filename, or press ESC to leave EDITOR.
-
- To enter text, type as you would if using a word processor or typewriter
- except when you reach the end of a line, press RETURN to start a new one.
- This is because in EDITOR there is no "word wrap"; it does not automatically
- start a new line unless you tell it to.
-
- Many of the quick keyboard shortcuts in EDITOR are similar to WordStar. You
- can get online help in EDITOR by pressing F1 or CTRL J. To exit from the
- help screen, press ESC.
-
- You can save your file by pressing CTRL KX. This will save your work for you
- and then exit EDITOR. To exit without saving your work, press CTRL KQ.
-
- Other useful keys:
-
- CTRL QR Goto start of file
- CTRL QC Goto end of file
- CTRL QS Goto start of line
- CTRL QD Goto end of line
- CTRL Y Delete current line
- Cursor keys⇩⇨⇦ Use these to move around the file
- Page Up Move the page up fourteen lines
- Page Down Move the page down fourteen lines
- Insert/ CTRL V Switch between insert/overtype mode
- CTRL KB Mark start of a block of text
- CTRL KK Mark end of a block of text
- CTRL KV Move a marked block of text
- CTRL KY Delete a marked block of text
- CTRL KC Copy a marked block of text
-
-
-
-
- Adding lines to text files
-
- You can quickly add lines to your CONFIG.SYS and AUTOEXEC.BAT files using
- the ECHO and COPY CON commands:
-
- The ECHO command:
-
-
- ECHO [drive][path]command/filename >> [drive][path]filename
-
- For example, to add the ANSI.SYS driver to the CONFIG.SYS file:
-
- ECHO DEVICE = C:\DOS\ANSI.SYS >> C:\CONFIG.SYS
-
- This will then append the above line to your CONFIG.SYS file in the root
- directory on the hard disc partition drive C.
-
- The COPY CON command:
-
- This command tells MS-DOS to copy what you type from the keyboard console,
- into a specified file. For example:
-
- COPY CON C:\AUTOEXEC.BAT
-
- will create a new file called AUTOEXEC.BAT into which you could type the
- following:
-
- PATH = C:\;C:\DOS
- PROMPT $P$G
-
- After the last line entered, press the F6 key to insert a CTRL Z (end of
- file marker), and then press ENTER to copy these lines into the AUTOEXEC.BAT
- file.
-
-
- Acknowledgements
-
- DR DOS is a trademark of Digital Research Inc.
- MS DOS is a trademark of Microsoft Corporation.
-